﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;

namespace Light
{
    /// <summary>
    /// 各种东西的基类
    /// </summary>
    abstract class UIElement
    {
        //public int ID;
        //public String Name;

        public Canvas parentCanvas;  // 父画布

        int x;
        int y;

        public int X
        {
            get { return x; }
            set { x = value; OnUpdate(); }
        }

        public int Y
        {
            get { return y; }
            set { y = value; OnUpdate(); }
        }


        public abstract void OnAnimate();

        /// <summary>
        /// 绘图信息更新
        /// </summary>
        public abstract void OnUpdate();

    }
}
